package com.sh.entity;

import java.util.List;

import org.springframework.util.StringUtils;

import com.sh.util.StrUtil;
import com.sh.util.TransferUtil;

/**
 * 系统参数类
 * */
public class SystemParam implements Comparable<SystemParam>{
	private int id;
	private int parentId;
	private String type;
	private String name;
	private String value;
	private String remark;

	private String createPerson;
	private String createTime;				//精确到是分秒
	private String lastUpdatePerson;
	private String lastUpdateTime;
	private String status;					//状态；默认都是1,-1表示删除了

	private List<SystemParam> childList;


	public List<SystemParam> getChildList() {
		return childList;
	}
	public void setChildList(List<SystemParam> childList) {
		this.childList = childList;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getParentId() {
		return parentId;
	}
	public void setParentId(int parentId) {
		this.parentId = parentId;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getCreatePerson() {
		return createPerson;
	}
	public void setCreatePerson(String createPerson) {
		this.createPerson = createPerson;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public String getLastUpdatePerson() {
		return lastUpdatePerson;
	}
	public void setLastUpdatePerson(String lastUpdatePerson) {
		this.lastUpdatePerson = lastUpdatePerson;
	}
	public String getLastUpdateTime() {
		return lastUpdateTime;
	}
	public void setLastUpdateTime(String lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}


	@Override
	public int compareTo(SystemParam o) {
		// TODO Auto-generated method stub 

		int thisVal = TransferUtil.strToInt(this.value);
		int otherVal = TransferUtil.strToInt(o.getValue());

		return (thisVal - otherVal);
	}



}
